Skip to content

Conversation

@udaykiran243
Copy link

Please add relevant labels and merge
Thanks!

Description

Fix Project-wide ESLint Errors and Refactor Blog Data Structure


📌 Description

This PR resolves 27 linting errors and warnings identified across the project to improve code quality and build stability. It also includes a significant refactor of the Blog component to separate data from the UI, resolving "Fast Refresh" warnings.

Key Changes:

  • Refactored Blog Structure: Moved generateBlogPosts and large image imports from components/Blog.jsx to a dedicated data/blogData.js file.
  • Fixed Data File: Replaced incorrect component code in src/data/blogData.js with the actual data generation logic.
  • Cleaned Code: Removed unused variables, imports (e.g., useTheme, setHoveredPlan), and unnecessary eslint-disable directives across multiple files (Navbar, Pricing, features, Login).
  • Config Updates:
    • Updated eslint.config.js to permit unused variables named motion (common in Framer Motion).
    • Fixed vite.config.js to correctly define __dirname in an ES Module environment.
  • Logic Fixes: Added missing dependency to useCallback in AuthContext and fixed catch block syntax in utility files.

🔗 Related Issue

Closes #254


🛠 Type of Change

  • 🐛 Bug fix (non-breaking change fixing an issue)
  • ✨ Enhancement (improves existing functionality)
  • 🚀 New feature (adds new functionality)
  • ♻️ Refactor (code change that neither fixes a bug nor adds a feature)
  • 📝 Documentation update

✅ Checklist

  • Code follows project coding standards
  • Self-review completed
  • Tests added or updated (if applicable)
  • All tests passed locally
  • Documentation updated (if required)
  • No new warnings or errors introduced

🧪 Testing Done

  • Linting: executed npm run lint which now exits with code 0 (previously failed with 27 errors).
  • Manual Verification: Verified that the Blog and Blog Detail pages still load correctly separately from the data file.
  • Build Check: Ensured no circular dependencies were introduced during the refactor.

Commands used:

npm run lint

@vercel
Copy link

vercel bot commented Feb 11, 2026

@udaykiran243 is attempting to deploy a commit to the Karan Manickam's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

🎉 Thanks for the PR, @udaykiran243!

We really appreciate you taking the time to contribute to CryptoHub! 💙


⭐ Love this project?

Please give us a star! It helps the project grow and reach more developers! 🌟

🔗 https://github.com/KaranUnique/CryptoHub---

✅ PR Checklist

Before we review, please ensure:

  • Your code follows the project's coding standards
  • All file changes are accurate and intentional
  • You've tested your changes locally
  • Any review comments have been addressed

We'll review your PR as soon as possible. Keep up the great work! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Errors while running npm run lint

1 participant